package com.wuba.rxjavademo.lyz;

import java.util.ArrayList;
import java.util.Arrays;

import rx.Observable;
import rx.Subscriber;

/**
 * Created by liyaxing on 2016/4/11.
 */
public class Demo {

    public static void main(String[] ss){
        refresh() ;
    }

    private static Observable<String> getData(){
        return /*Observable.just("aaa", "aaa", "bbb", "bbb", "ccc").flatMap(s -> "asdf")*/null;
    }

    private static void refresh() {

        getData().subscribe(new Subscriber<String>() {
            @Override
            public void onCompleted() {
            }

            @Override
            public void onError(Throwable e) {

            }

            @Override
            public void onNext(String str) {
                System.out.println(str);
            }
        }) ;
    }

}
